package baidu;

import java.math.BigInteger;
import java.util.Scanner;

/**
 * @author zc
 * @version 1.0
 * @date 2021/9/7 17:59
 */
public class Main4 {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String next = sc.next();
            int a = Integer.parseInt(next);
            int b = a-1;
            String a1 = a+"";
            String b1 = b+"";
            BigInteger a2 = new BigInteger(a1);
            BigInteger b2 = new BigInteger(b1);
            BigInteger one = new BigInteger("1");
            BigInteger result = (a2.multiply(b2).subtract(one));
            System.out.println(result);
        }
}
